<?php /* Smarty version 2.6.26, created on 2013-10-20 21:42:26
         compiled from ./admin/attribute_list.html */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "../templates/admin/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script type="text/javascript" src="../js/jquery.js">
</script>
<script type="text/javascript" src="js/searchAttr.js">
</script>
<script type="text/javascript" src="js/admin_delete.js">
</script>


<div class="form-div">
  <form action="" name="searchForm">
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" /> 按商品类型显示
    <select name="goods_type" onchange="searchAttr(this)">
    <option value="0">所有商品类型</option>
    <?php $_from = $this->_tpl_vars['cat_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['cat']):
?>
    <option value="<?php echo $this->_tpl_vars['cat']['cat_id']; ?>
" <?php if ($this->_tpl_vars['cat']['cat_id'] == $this->_tpl_vars['cat_id']): ?>selected="selected"<?php endif; ?> ><?php echo $this->_tpl_vars['cat']['cat_name']; ?>
</option>
    <?php endforeach; endif; unset($_from); ?>
    </select>
  </form>
</div>

<form method="post" action="attribute.php?act=add" name="listForm">
<div class="list-div" id="listDiv">

  <table cellpadding="3" cellspacing="1" id="table">
    <tr>
      <th>编号</th>
      <th>属性名称</th>
      <th>商品类型</th>
      <th>属性值的录入方式</th>
      <th>属性可选值</th>
      <th>操作</th>
    </tr>
    <?php if ($this->_tpl_vars['attr_list'] != ''): ?>
    <?php $_from = $this->_tpl_vars['attr_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['attr']):
?>
    <tr>
      <td nowrap="true" valign="top"><span><?php echo $this->_tpl_vars['attr']['attr_id']; ?>
</span></td>
      <td class="first-cell" nowrap="true" valign="top"><span><?php echo $this->_tpl_vars['attr']['attr_name']; ?>
</span></td>
      <td nowrap="true" valign="top"><span><?php echo $this->_tpl_vars['cat_name']; ?>
</span></td>
      <td nowrap="true" valign="top"><span><?php echo $this->_tpl_vars['attr']['attr_input_type']; ?>
</span></td>
      <td valign="top"><span><?php echo $this->_tpl_vars['attr']['attr_values']; ?>
</span></td>
      <td align="center" nowrap="true" valign="top">
        <a href="attribute.php?act=edit&attr_id=<?php echo $this->_tpl_vars['attr']['attr_id']; ?>
" title="编辑"><img src="images/icon_edit.gif" border="0" height="16" width="16"></a>
        <a href="javascript:;" onclick="remove(this, 'attribute.php?act=delete&attr_id=<?php echo $this->_tpl_vars['attr']['attr_id']; ?>
')" title="删除"><img src="images/icon_drop.gif" border="0" height="16" width="16"></a>
      </td>
    </tr>
    <?php endforeach; endif; unset($_from); ?>
    <?php else: ?>
    <tr><td class="no-records" colspan="10">没有属性记录</td></tr>
    <?php endif; ?>
  </table>
</div>

</form>
<script language="JavaScript">

  /* listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}

  {literal}
  onload = function()
  {
      // 寮�妫�煡璁㈠崟
      startCheckOrder();
  } */

  /* function searchAttr(obj){
	  alert('fdaf');
    listTable.filter.goods_type = goodsType;
    listTable.filter.page = 1;
    listTable.loadList();
  } */

  /* function removeRow(attr_id){
    Ajax.call('attribute.php?act=get_attr_num&attr_id=' + attr_id, '', removeRowResponse, 'GET', 'JSON');
  }

  function removeRowResponse(result){
    if (result.message.length > 0){
      alert(result.message);
    }
    if (result.error == 0){
      listTable.remove(result.content.attr_id, result.content.drop_confirm);
    }
  } 

  {/literal}*/
</script>